export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    meta: [
      { charset: "utf-8" },
      {
        name: "viewport",
        content:
          "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no",
      },
      { name: "format-detection", content: "telephone=no" },
      { "http-equiv": "X-UA-Compatible", content: "IE=edge" },
      // Search Engines
      { name: "robots", content: "index, follow" },
      { name: "googlebot", content: "index, follow" },
      { name: "revisit-after", content: "1 days" },
      { name: "copyright", content: "Savinginsta" },
      { name: "author", content: "Savinginsta" },
      { name: "google-site-verification", content: "4p0prSa8FkQEiLGsZfr4eo_tPSXIQ5VkwD7CnfC5Kyo" },
     
    ],
    link: [
      { rel: "icon", type: "image/x-icon", href: "/favicon.ico" },
      // Favicons
      {
        rel: "shortcut icon",
        href: "https://savinginsta.com/static/images/logo.webp",
        sizes: "512x512",
      },
      {
        rel: "apple-touch-icon",
        href: "https://savinginsta.com/static/images/logo.webp",
        sizes: "192x192",
      },
    ],
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: ["~/static/style/nuxt.css"],
  router: {
    middleware: ["trailing-slash"],
  },
  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [{ src: "@/plugins/Firebase.js", ssr: false }],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,
  buildDir: ".nuxt",
  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [],
  serverMiddleware: ["~/server-middleware/validateBlogRoute.js",'~/api/convert-to-base64.js'],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/axios
    "@nuxtjs/axios",
  ],
  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    publicPath: "/_nuxt/",
    // ... 其他构建配置
  },
  env: {
    DES_KEY: process.env.DES_KEY,
    DES_IV: process.env.DES_IV,
    DES_CMS_KEY: process.env.DES_CMS_KEY,
    DES_CMS_IV: process.env.DES_CMS_IV,
    part1: process.env.part1,
    part2: process.env.part2,
    part3: process.env.part3,
    part4: process.env.part4,
    part5: process.env.part5,
    part6: process.env.part6,
    part7: process.env.part7,
    part8: process.env.part8,
  },
  server: {
    host: "0.0.0.0", // 默认为 localhost，设置为 0.0.0.0 则表示接受任何来自公共网络的连接
    port: 3000, // 默认为 3000
  },
  vue: {
    config: {
      productionTip: false,
      silent: process.env.NODE_ENV === "production" ? true : false, // 启用时，Vue 将停止在控制台输出未捕获的错误或警告。
      errorHandler: (err, vm, info) => {
        if (process.env.NODE_ENV !== "production") console.error(err, info);
      },
      warnHandler: (msg, vm, trace) => {
        if (process.env.NODE_ENV !== "production") console.warn(msg, trace);
      },
    },
  },
};
